// API请求和响应类型定义 - 基于Java ApiInfo类结构重构

// API参数信息接口
export interface ApiParam {
  name: string;
  fullType: string;
  simpleType: string;
  description?: string;
  required: boolean;
  defaultValue?: string;
  example?: string;
  version: string;
  nestedFields: ApiParam[];
  order: number;
  [key: string]: any;
}

// API模型接口
export interface ApiModel {
  params: ApiParam[];
  type: string;
  [key: string]: any;
}

// API头信息类型
export interface ApiHeader {
  name: string;
  value?: string;
  description?: string;
  [key: string]: any;
}
export interface SimpleApiInfo{
  id: string;
  name: string;
  description?: string;
  apiType: string;
  apiCategory: string;
  order: number;
}
// API信息接口 - 基于Java ApiInfo类
export interface ApiInfo {
  id: string;
  apiCategory: string;
  apiType: string;
  path: string;
  method: string;
  name: string;
  description?: string;
  controllerClass: string;
  methodName: string;
  requestBodyModel?: ApiModel;
  responseModel?: ApiModel;
  order: number;
  [key: string]: any;
}

// 通用API响应接口
export interface ApiResponse<T = any> {
  ret: number;
  data: T;
  message?: string;
}

// API接口类型定义
export interface Parameter {
  name: string;
  type: string;
  required: boolean;
  description?: string;
  default?: any;
  defaultValue?: any;
}

// API模块分类
export interface APIModule {
  category: string;
  description?: string;
  apis: SimpleApiInfo[];
}